package com.futureCloudMOM.controller.core.web.basic;

import com.futureCloudMOM.common.core.page.TableDataInfo;
import com.futureCloudMOM.controller.core.controller.BaseApiController;
import com.futureCloudMOM.core.domain.BasicGroup;
import com.futureCloudMOM.core.service.BasicGroupService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 文件名 BasicGroupController
 *
 * @since 2023/6/6 13:57
 */
@Api(tags = "班组信息")
@RestController
@RequestMapping("basic/group")
public class BasicGroupController extends BaseApiController<BasicGroup, BasicGroup, BasicGroupService> {

    public BasicGroupController(BasicGroupService service) {
        super(service);
    }

    @ApiOperation("查询所有班组--可根据名称和编码进行筛选--可分页")
    @PostMapping("/getListByNameAndCode")
    public TableDataInfo getListByNameAndCode(@RequestBody BasicGroup basicGroup){
        startPage();
        return getDataTable(service.getListByNameAndCode(basicGroup));
    }

}
